package pt.inescid.components.policyengine.heimdall.pap.base;


public class PurgeDefinition {

	private RuleDefinition purgeFilter;
	private String every;
	
	
	/* ===========================================================
	==============================================================
	=============                    =============================
	=============      CONSTRUCTORS       =============================
	=============                    =============================
	==============================================================
	=========================================================== */
	public PurgeDefinition(String every) {
		this.every = every;
	}

	
	
	public void setPurgeFilter(RuleDefinition newExpression, 
			RuleDefinition previousLevelExp) {
		
		if (previousLevelExp == null) {
			purgeFilter = newExpression;
		}
		else {
			((CompositeDefinition) previousLevelExp).
			addOperand(newExpression);
		}
	}



	public String getEvery() {
		return every;
	}


	public RuleDefinition getPurgeFilter() {
		return purgeFilter;
	}


	public void setEvery(String every) {
		this.every = every;
	}


	public void setPurgeFilter(RuleDefinition purgeFilter) {
		this.purgeFilter = purgeFilter;
	}


	
}; // PurgeDefinition
